<?php
/**
 * Created by PhpStorm.
 * User: Inhere
 * Date: 2015/2/7
 * Time: 17:09
 * Use :
 * File: InterfaceDbDriver.php
 */

namespace ulue\core\db\base;

interface InterfaceDbDriver
{
    public function connect();

    // public function setCharset();

    public function close();                # 关闭连接

    public function createCmd();            # 返回实例

    public function execute();                # 执行sql语句

    public function getInsertId();             # 获得最后插入的id

    public function getAffectedRows();      # 受影响的行数

    public function getVersion();           # 获得版本

    public function beginTrans();           # 自动提交模式true开启false关闭

    public function commit();               # 提供一个事务

    public function rollback();             # 回滚事务
}